package com.apes.oap.request.converter;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpInputMessage;

import java.io.IOException;
import java.io.InputStream;

/**
 * 功能：
 *
 * @author xul
 * @create 2018-09-04 17:59
 */
public class MappingInputMessage implements HttpInputMessage {

    private final InputStream body;

    private final HttpHeaders headers;

    public MappingInputMessage(InputStream body, HttpHeaders headers) {
        this.body = body;
        this.headers = headers;
    }

    @Override
    public InputStream getBody() throws IOException {
        return this.body;
    }

    @Override
    public HttpHeaders getHeaders() {
        return this.headers;
    }

}
